﻿<Window x:Class="Workbench.Presentation.NewProjectDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="New Project" 
        ResizeMode="NoResize"
        ShowInTaskbar="False"
        SizeToContent="WidthAndHeight"
        WindowStartupLocation="CenterOwner"
        FocusManager.FocusedElement="{Binding ElementName=ProjectNameBox}" >
    <Window.Resources>
        <Style TargetType="{x:Type Button}" >
            <Setter Property="Width" Value="60"></Setter>
            <Setter Property="Height" Value="20"></Setter>
        </Style>
    </Window.Resources>
    <Grid Margin="15 10">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="85"></ColumnDefinition>
            <ColumnDefinition Width="300"></ColumnDefinition>
            <ColumnDefinition Width="65"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Label Content="_Project Name:" 
               Target="{Binding ElementName=ProjectNameBox}"
               Grid.Column="0"
               Grid.Row="0" HorizontalAlignment="Right"></Label>
        <TextBox Grid.Row="0" 
                 x:Name="ProjectNameBox"
                 Height="20"
                 Text="{Binding ProjectName, UpdateSourceTrigger=PropertyChanged}"
                 Grid.Column="1"></TextBox>
        <Label 
            Grid.Row="1" 
            Grid.Column="0"
            Content="_Location:"
            Target="{Binding ElementName=BrowseButton}" HorizontalAlignment="Right"></Label>
        <TextBox Grid.Row="1"
                 Grid.Column="1"
                 IsReadOnly="true"
                 Height="20"
                 Text="{Binding Path=ProjectDbPath}"
                 x:Name="LocationBox"></TextBox>
        <Button Grid.Row="1" 
                Grid.Column="2"
                HorizontalAlignment="Right"
                x:Name="BrowseButton"
                Click="BrowseButton_Click">_Browse</Button>
        <Grid Grid.Row="3" Grid.ColumnSpan="3">
            <StackPanel 
                Grid.Column="1"
            Orientation="Horizontal"
            HorizontalAlignment="Right"
            Margin="0 10 0 0">
                <Button IsDefault="True" Click="okButton_Click" Margin="0 0 5 0" Content="_OK"></Button>
                <Button IsCancel="True" Content="_Cancel"></Button>
            </StackPanel>
        </Grid>
    </Grid>
</Window>
